workspace "projectRobot"
	architecture "x64"
	
	configurations
	{
		"Debug",
		"Release",
		"Dist"
	}

outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"

project "OpenGL"
	--kind "StaticLib"
    location "OpenGL"
    kind "ConsoleApp"
	language "C++"
	staticruntime "off"
	warnings "off"

	targetdir ("bin/" .. outputdir .. "/%{prj.name}")
	objdir ("bin-int/" .. outputdir .. "/%{prj.name}")

	files
	{
        "OpenGL/**.cpp",
        "OpenGL/**.c",
        "OpenGL/**.h",
        "OpenGL/**.hpp",
        "OpenGL/**.shader",
        "res/**.png"
	}
    includedirs
    {
        "OpenGL/src",
        "Dependencies/GLEW/include",
        "Dependencies/GLFW_x64/include",
        "OpenGL/src/vendor"
    }
    libdirs
    {
        "Dependencies/GLEW/lib/Release/x64",
        "Dependencies/GLFW_x64/lib-vc2022"    
    }
    links
    {
        "glfw3.lib",
        "opengl32.lib",
        "glew32.lib"
    }

	postbuildcommands
		{
			("{COPY} ../Dependencies/GLEW/bin/Release/x64/glew32.dll ../bin/" .. outputdir.. "/OpenGL")
		}
	filter "system:linux"
		pic "On"

		systemversion "latest"
		
		files
		{
		}

		defines
		{
		}

	filter "system:macosx"
		pic "On"

		files
		{
		}

		defines
		{
		}

	filter "system:windows"
		systemversion "latest"

		files
		{
		}

		defines 
		{ 
		}

	filter "configurations:Debug"
		runtime "Debug"
		symbols "on"

	filter { "system:windows", "configurations:Debug-AS" }	
		runtime "Debug"
		symbols "on"
		sanitize { "Address" }
		flags { "NoRuntimeChecks", "NoIncrementalLink" }

	filter "configurations:Release"
		runtime "Release"
		optimize "speed"

    filter "configurations:Dist"
		runtime "Release"
		optimize "speed"
        symbols "off"